<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <meta name="renderer" content="webkit" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>50bus-剧本</title>
    <meta name="keywords" content="50bus" />
    <meta name="copyright" content="50bus.cn" />
    <!-- <meta http-equiv="mobile-agent" content="http://www.50bus.cn/" />
    <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" /> -->
    <link rel="icon" href="/resources/img/favicon.ico" type="image/x-icon" />
    
    <link rel="stylesheet" type="text/css" href="/resources/css/base.css" media="all" />
    <link rel="stylesheet" type="text/css" href="/resources/css/globe.css" media="all" />
    <link rel="stylesheet" type="text/css" href="/resources/css/module-script.css" media="all" />
    <link rel="stylesheet" type="text/css" href="/resources/css/page.css" media="all" />
    <script type="text/javascript" src="/resources/js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="/resources/js/jquery.pagination.js"></script>


</head>

<body>
    <div class="header_wrap">
        <div class="header clearfix">
            <div class="fm980 fl clearfix">
                <a href="/index.html" class="logo fl"></a>
                <ul class="nav_box fl">
                    <li><a href="/creative_list.html">形象创意</a></li>
                    <li><a href="/script_list.html" class="cur">剧本创作</a></li>
                    <li><a href="/render_index.html">动画渲染</a></li>
                    <li><a href="/creative_helper.html">创意助手</a></li>
                </ul>
                <div class="about_box fr">
                    <a href="/about.html">关于我们</a>
                    <#if uid??&&uid!="">
	                    <a href="/user/user_work.html">个人空间</a>
	                    <a href="/logout.html">退出</a>
                    <#else>
	                    <a href="/register.html">注册</a>
	                    <a href="/login.html">登录</a>
                    </#if>
                </div>
            </div>
        </div>

    </div>

    <div class="body_wrap">
        <div class="handle_bar">
            <div class="fm980 clearfix">
            		<#if user?? && (user.role==1)>
                    	<a class="btn_com_red fl" href="/script_collect.html" style="padding:0 35px 0 25px;"><i class="icon_add"></i>剧本征集</a>
                    </#if>
                    <form class="searchbox clearfix fr" action="script_list.html" id="search_form" method="post">
                        <input type="text" name="keyword" class="sc_txt fl"  value="${RequestParameters.keyword!''}" placeholder="请输入标题、征集者"/>
                        <input id="submit" type="submit" value="" class="sc_btn fl" />
                    </form>
                </div>
        </div>
        <!-- banner -->
        <div class="box_2">
            <div class="banner_box"><a href="${banner.url}" target="_blank"><img style="width:980px;height:260px;" src="${banner.img}" /></a></div>
        </div>
        <div class="fm980">

            <div class="script_hot_box">
                <p class="title_18">热门剧本</p>
                <ul class="script_hot_list">
                  <#list scriptList as script>
                    <a href="/script_collect_detail.html?sid=${script.sid}">
                    <li class="clearfix">
                        <div class="spt_img_box fl"><#if script.s_cover??&&script.s_cover!=""><img style="width:96px;height:140px;" src="${script.s_cover}" /><#else><img  src="/resources/img/script_def_90x134.png"></#if></div>
                        <div class="spt_info_gather"> 
                            <div class="spt_info">
                                <div class="spt_opr fr">
                                    <span class="spt_price">￥${script.collect_budget?string("0.##")}</span>
                                    <#if (script.start_time?datetime("yyyy-MM-dd")) gt (.now)>
                                    	<p class="txt_r">${script.participate_count}投稿<span class="ml20" style="color:blue;">投稿未开始</span></p>
                                    <#elseif (script.end_time?datetime("yyyy-MM-dd")) gt (.now) >
                                    	<p class="txt_r">${script.participate_count}投稿<span class="ml20" style="color:green;">投稿中</span></p>
                                    <#elseif script.vote_end_time?? && (script.vote_end_time?datetime("yyyy-MM-dd") lte .now)>
                                    	<p class="txt_r">${script.participate_count}投稿<span class="ml20" style="color:grey;">投票已结束</span></p>
                                    <#else>
                                    	<p class="txt_r">${script.participate_count}投稿<span class="ml20" style="color:green;">投票中</span></p>
                                    </#if>
                                </div>
                                <p class="spt_name">${script.script_title}/${script.collect_type}</p>
                                <p class="spt_sponsor">发起方：${script.comp}</p>
                            </div>
                            <div class="spt_desc">
                                <p class="spt_desc_t">剧情摘要：</p>
                                <p><#if script.script_demand?length gt 112 >${script.script_demand?substring(0,112)}...<#else>${script.script_demand}</#if><a href="/script_collect_detail.html?sid=${script.sid}" class="more">了解更多</a></p>
                            </div>
                        </div>
                     </li>
                    </a>
                   </#list>
                 <div id="Pagination" class="page_box mb40"></div>
                </ul>
            </div>

            <div class="writer_hot_box">
                <p class="title_18">热门写手</p>
                <div class="writer_hot_list" id="writer_hot_list">
                    <a class="ms_btn ms_prev" href="javascript:;"></a>
                    <a class="ms_btn ms_next" href="javascript:;"></a>
                    <div class="writer_list">
                        <ul class="ms_slider clearfix">
                          <#list scriptOwnList as scriptOwn>
                            <li class="ms_item">
                                <a class="writer_pic" href="/comp_attribute_list.html?attribute_uid=${scriptOwn.uid}" target="_blank">
                                	<#list userList as user>
	                                   <#if scriptOwn.uid==user.uid>
	                                   		<#if user.header_img?? && user.header_img != ''>
	                                			<img  style="width:120px;height:132px;" src="${user.header_img}"/>
	                                		<#else>
	                                			<img  src="/resources/img/user_def_120x132.png"/>
	                                		</#if>
	                                   </#if>
	                                </#list>
                                </a>
                                <#list userList as user>
                                   <#if scriptOwn.uid=user.uid>
                                		<p><a href="/comp_attribute_list.html?attribute_uid=${scriptOwn.uid}">${user.comp}</a></p>
                                		<#break>
                                   </#if>
                                </#list>
                                <p>票数：${scriptOwn.addlike}</p>
                            </li>
                          </#list> 
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="footer">
        <div class="fm980 clearfix">
            <div class="foot_link foot_link1 fl">
                <a href="/creative_list.html">形象创意</a>
                <a href="/script_list.html">剧本创作</a>
                <a href="/render_index.html">动画渲染</a>
                <a href="/creative_helper.html" >创意助手</a>
            </div>
            <div class="foot_link foot_link2 fl">
                <a href="http://zjusp.zju.edu.cn/">浙大科技园</a>
                <a href="http://www.zju.edu.cn/">浙江大学</a>
                <a href="/about.html" >关于我们</a>
            </div>
            <div class="copy_box fr">
                <img class="mb5" src="/resources/img/foot_text.png" />
                <p>&copy; 2013-2016 All right reserved</p>
                <p><a href="">服务条款</a><a href="">隐私条款</a><a href="">法律条款</a></p>
                <p style="display:none;"><a href="" class="share_icon share_sina"></a><a href="" class="share_icon share_wx"></a></p>
            </div>
        </div>
    </div>
<script type="text/javascript" src="/resources/js/slider.js"></script>
<script type="text/javascript" src="/resources/js/page-script-main.js"></script>
<script type="text/javascript">
$(function(){
	var initPagination = function() {
		$("#Pagination").pagination(${totalCount}, {
			num_edge_entries: 2, //边缘页数
			num_display_entries: 4, //主体页数
			callback: pageselectCallback,
			items_per_page:${pageSize}, //每页显示创意数量
			current_page:${pageIndex}-1,
			prev_text:"<",
			next_text:">",
			ellipse_text:"...",
			prev_show_always:true,
			next_show_always:true,
			async:false
		});
	 }();
	function pageselectCallback(current_page, panel){
		location.href = "/script_list.html?keyword=${RequestParameters.keyword!''}&pageIndex="+(current_page+1);
	}
});
</script>
<script type="text/javascript">
	<#if uid??&&uid!="">
    	$.post("/common/getUserName.json",{"uid":${uid}},function(data){
    		if(data.name){
    			$('a[href="/user/user_work.html"]').html(data.name+"个人空间");
    		}
    	});
	 </#if>
</script>
</body>
</html>